***************************************************************************
****************************************************************************


log using "C:\Users\gk57526\Dropbox\Executive Particularism (Matt Zarit)\Negative Grants\Winter 2020\Output\Manuscript Model Results.03-18-2020.smcl"


**** Krause and Zarit, Negative Grants: Contraction of Policy Benefits in U.S. Federal Agencies *************************

use "C:\Users\gk57526\Dropbox\Executive Particularism (Matt Zarit)\Negative Grants\Winter 2020\Data\neg_grants_data.01-02-2020.03-18-2020.original.dta"




* SET PANEL IDENTIFIER *
xtset program_id


*********************************************************************************************************************************************************************************************************************************************************
*********************************************************************************************************************************************************************************************************************************************************
*********************************************************************************************************************************************************************************************************************************************************
*********************************************************************************************************************************************************************************************************************************************************
*********************************************************************************************************************************************************************************************************************************************************
*********************************************************************************************************************************************************************************************************************************************************

*** GENERATE GRANT AGE BINARY INDICATORS: 0-4 QTRS; 5-16 QTRS; 17-32 QTRS; & 33 QTRS PLUS ***  
gen grantageqtr04=1 if grant_age_qtrs>=0 & grant_age_qtrs<=4
replace grantageqtr04=0 if grantageqtr04!=1 & grant_age_qtrs>=0
*
gen grantageqtr516=1 if grant_age_qtrs>=5 & grant_age_qtrs<=16
replace grantageqtr516=0 if grantageqtr516!=1 & grant_age_qtrs>=0
*
gen grantageqtr1732=1 if grant_age_qtrs>=17 & grant_age_qtrs<=32
replace grantageqtr1732=0 if grantageqtr1732!=1 & grant_age_qtrs>=0
*
gen grantageqtr33plus=1 if grant_age_qtrs>32
replace grantageqtr33plus=0 if grantageqtr33plus!=1 & grant_age_qtrs>=0


*** GENERATE MEASURES OF AGENCY COMPLEXITY: AGENCY TOTAL EMPLOYMENT * PERCENT TECHNICAL STAFF

gen agencycomplexity = totalemp*tech_pct
gen lnagencycomplexity =ln(agencycomplexity)





*********************************************************************************************************************************************************************************************************************************************************
*********************************************************************************************************************************************************************************************************************************************************
*********************************************************************************************************************************************************************************************************************************************************
*********************************************************************************************************************************************************************************************************************************************************
*********************************************************************************************************************************************************************************************************************************************************
*********************************************************************************************************************************************************************************************************************************************************
*********************************************************************************************************************************************************************************************************************************************************
*********************************************************************************************************************************************************************************************************************************************************
*********************************************************************************************************************************************************************************************************************************************************
*********************************************************************************************************************************************************************************************************************************************************
*********************************************************************************************************************************************************************************************************************************************************
*********************************************************************************************************************************************************************************************************************************************************


*** BASIS FOR AVERAGE MARGINAL EFFECTS COMES FROM THE WITHIN STANDARD DEVIATION OF EACH RELEVANT COVARIATE CENTRAL TO TESTING THE POLITICAL ACCOUNTABILITY - BUREAUCRATIC RESPONSIBILITY THESIS ***


*** ALL FOUR LINCOMS DENOTED BELOW ARE ESTIMATED BASED UPON A TWO WITHIN-AGENCY STANDARD DEVIATION CHANGE IN THE COVARIATE [see Mummolo and Peterson 2018: PSRM Point #2, Page 6]*** 




* PANEL DESCRIPTIVE STATISTICS FOR THE KEY PRESIDENTIAL CONTROL & BUREAUCRATIC PERFORMANCE COVARIATES FROM THE EFFECTIVE REGRESSION SAMPLE [N = 744,653  INDIVIDUAL GRANT RETRENCHMENTS] *

quietly xtreg neg_fed_funding presparty2xclintonlewis  zloyalty2_abszero  zmanage2_abszero zpolicy2_abszero  ///
agency_totalgrantamtyr lnagencycomplexity  cuts_year ihs_grantamount  grantageqtr516 grantageqtr1732 grantageqtr33plus ///
presparty2 clintonlewis unified second_term pres_sameparty_cut pres_diffparty_cut ///
i.year i.agency if neg_fed_funding>0 & type_of_grant !="03" & type_of_action=="C", vce(cluster program_id)

*
xtsum  presparty2xclintonlewis zloyalty2_abszero zmanage2_abszero zpolicy2_abszero  if e(sample)


* DESCRIPTIVE STATISTICS FOR THE DEPENDENT VARIABLE IN ITS NATURAL CONSTANT-DOLLAR FORM & CORRESPONDING NATURAL LOG FORM [N = 744,649 INDIVIDUAL GRANT RETRENCHMENTS] ***

sum neg_fed_funding  if e(sample) & neg_fed_funding>0, detail







*** I. MANUSCRIPT MODELS CONTAIN THREE-WAY FIXED EFFECTS [PROGRAM-SPECIFIC, AGENCY-SPECIFIC, AND YEAR-SPECIFIC FIXED EFFECTS [WITH ROBUST SE CLUSTERING ON PROGRAM_ID]  *** 



************ TABLE 1 ****************************************************************************** ****************************************************************************************************************************************************

** OLS: E(Y) CONDITIONAL MEAN MODEL **

xtreg neg_fed_funding presparty2xclintonlewis  zloyalty2_abszero  zmanage2_abszero zpolicy2_abszero  ///
agency_totalgrantamtyr lnagencycomplexity  cuts_year ihs_grantamount  grantageqtr516 grantageqtr1732 grantageqtr33plus ///
presparty2 clintonlewis unified second_term pres_sameparty_cut pres_diffparty_cut ///
i.year i.agency if neg_fed_funding>0 & type_of_grant !="03" & type_of_action=="C", vce(cluster program_id)
*
*
*** POLITICAL ACCOUNTABILITY-MOTIVATED GRANT RETRENCHMENT EFFECTS [INDIVIDUAL GRANT RETRENCHMENTS] ***

lincom  (presparty2xclintonlewis*0.677539*2)
*
lincom (zloyalty2_abszero*0.569556*2)

*** BUREAUCRATIC REPSONSIBILITY-MOTIVATED GRANT RETRENCHMENT EFFECTS [INDIVIDUAL GRANT RETRENCHMENTS] ***  

lincom  (zmanage2_abszero*0.6853556*2) 
*
lincom (zpolicy2_abszero*0.6009016*2)

*
*

*** UNCONDITIONAL QUANTILE FIXED EFFECTS REGRESSION MODELS AT VARIOUS QUANTILES OF INTEREST *** 

* q = 1 *

xtrifreg neg_fed_funding presparty2xclintonlewis  zloyalty2_abszero  zmanage2_abszero zpolicy2_abszero  agency_totalgrantamtyr lnagencycomplexity  ///
cuts_year ihs_grantamount grantageqtr516 grantageqtr1732 grantageqtr33plus presparty2 clintonlewis unified second_term pres_sameparty_cut pres_diffparty_cut ///
agendum1 agendum2 agendum3 agendum4 agendum5 agendum6 agendum7 agendum8 agendum9 agendum10 agendum11 agendum12 agendum13 agendum14 ///
agendum15 agendum17 agendum18 agendum19 agendum20 agendum21 ///
yeardum6 yeardum7 yeardum8 yeardum9 yeardum10 yeardum11 yeardum12 yeardum13 yeardum14 yeardum15 yeardum16 yeardum17 ///
yeardum18 yeardum19 yeardum20 yeardum21 yeardum22 yeardum23 yeardum24 yeardum25  if neg_fed_funding>0 & type_of_grant !="03" & type_of_action=="C", fe i(program_id) q(1)


*** POLITICAL ACCOUNTABILITY-MOTIVATED GRANT RETRENCHMENT EFFECTS [INDIVIDUAL GRANT RETRENCHMENTS] ***

lincom  (presparty2xclintonlewis*0.677539*2)
*
lincom (zloyalty2_abszero*0.569556*2)



*** BUREAUCRATIC REPSONSIBILITY-MOTIVATED GRANT RETRENCHMENT EFFECTS [INDIVIDUAL GRANT RETRENCHMENTS] ***  

lincom  (zmanage2_abszero*0.6853556*2) 
*
lincom (zpolicy2_abszero*0.6009016*2)

*
*

* q = 10 *

xtrifreg neg_fed_funding presparty2xclintonlewis  zloyalty2_abszero  zmanage2_abszero zpolicy2_abszero  agency_totalgrantamtyr lnagencycomplexity  ///
cuts_year ihs_grantamount grantageqtr516 grantageqtr1732 grantageqtr33plus presparty2 clintonlewis unified second_term pres_sameparty_cut pres_diffparty_cut ///
agendum1 agendum2 agendum3 agendum4 agendum5 agendum6 agendum7 agendum8 agendum9 agendum10 agendum11 agendum12 agendum13 agendum14 ///
agendum15 agendum17 agendum18 agendum19 agendum20 agendum21 ///
yeardum6 yeardum7 yeardum8 yeardum9 yeardum10 yeardum11 yeardum12 yeardum13 yeardum14 yeardum15 yeardum16 yeardum17 ///
yeardum18 yeardum19 yeardum20 yeardum21 yeardum22 yeardum23 yeardum24 yeardum25  if neg_fed_funding>0 & type_of_grant !="03" & type_of_action=="C", fe i(program_id) q(10)



*** POLITICAL ACCOUNTABILITY-MOTIVATED GRANT RETRENCHMENT EFFECTS [INDIVIDUAL GRANT RETRENCHMENTS] ***

lincom  (presparty2xclintonlewis*0.677539*2)
*
lincom (zloyalty2_abszero*0.569556*2)



*** BUREAUCRATIC REPSONSIBILITY-MOTIVATED GRANT RETRENCHMENT EFFECTS [INDIVIDUAL GRANT RETRENCHMENTS] ***  

lincom  (zmanage2_abszero*0.6853556*2) 
*
lincom (zpolicy2_abszero*0.6009016*2)

*
*


* q = 25 *

xtrifreg neg_fed_funding presparty2xclintonlewis  zloyalty2_abszero  zmanage2_abszero zpolicy2_abszero  agency_totalgrantamtyr lnagencycomplexity  ///
cuts_year ihs_grantamount grantageqtr516 grantageqtr1732 grantageqtr33plus presparty2 clintonlewis unified second_term pres_sameparty_cut pres_diffparty_cut ///
agendum1 agendum2 agendum3 agendum4 agendum5 agendum6 agendum7 agendum8 agendum9 agendum10 agendum11 agendum12 agendum13 agendum14 ///
agendum15 agendum17 agendum18 agendum19 agendum20 agendum21 ///
yeardum6 yeardum7 yeardum8 yeardum9 yeardum10 yeardum11 yeardum12 yeardum13 yeardum14 yeardum15 yeardum16 yeardum17 ///
yeardum18 yeardum19 yeardum20 yeardum21 yeardum22 yeardum23 yeardum24 yeardum25  if neg_fed_funding>0 & type_of_grant !="03" & type_of_action=="C", fe i(program_id) q(25)


*** POLITICAL ACCOUNTABILITY-MOTIVATED GRANT RETRENCHMENT EFFECTS [INDIVIDUAL GRANT RETRENCHMENTS] ***

lincom  (presparty2xclintonlewis*0.677539*2)
*
lincom (zloyalty2_abszero*0.569556*2)


*** BUREAUCRATIC REPSONSIBILITY-MOTIVATED GRANT RETRENCHMENT EFFECTS [INDIVIDUAL GRANT RETRENCHMENTS] ***  

lincom  (zmanage2_abszero*0.6853556*2) 
*
lincom (zpolicy2_abszero*0.6009016*2)

*
*


*q = 50 *

xtrifreg neg_fed_funding presparty2xclintonlewis  zloyalty2_abszero  zmanage2_abszero zpolicy2_abszero  agency_totalgrantamtyr lnagencycomplexity  ///
cuts_year ihs_grantamount grantageqtr516 grantageqtr1732 grantageqtr33plus presparty2 clintonlewis unified second_term pres_sameparty_cut pres_diffparty_cut ///
agendum1 agendum2 agendum3 agendum4 agendum5 agendum6 agendum7 agendum8 agendum9 agendum10 agendum11 agendum12 agendum13 agendum14 ///
agendum15 agendum17 agendum18 agendum19 agendum20 agendum21 ///
yeardum6 yeardum7 yeardum8 yeardum9 yeardum10 yeardum11 yeardum12 yeardum13 yeardum14 yeardum15 yeardum16 yeardum17 ///
yeardum18 yeardum19 yeardum20 yeardum21 yeardum22 yeardum23 yeardum24 yeardum25  if neg_fed_funding>0 & type_of_grant !="03" & type_of_action=="C", fe i(program_id) q(50)


*** POLITICAL ACCOUNTABILITY-MOTIVATED GRANT RETRENCHMENT EFFECTS [INDIVIDUAL GRANT RETRENCHMENTS] ***

lincom  (presparty2xclintonlewis*0.677539*2)
*
lincom (zloyalty2_abszero*0.569556*2)


*** BUREAUCRATIC REPSONSIBILITY-MOTIVATED GRANT RETRENCHMENT EFFECTS [INDIVIDUAL GRANT RETRENCHMENTS] ***  

lincom  (zmanage2_abszero*0.6853556*2) 
*
lincom (zpolicy2_abszero*0.6009016*2)

*
*

* q = 75*

xtrifreg neg_fed_funding presparty2xclintonlewis  zloyalty2_abszero  zmanage2_abszero zpolicy2_abszero  agency_totalgrantamtyr lnagencycomplexity  ///
cuts_year ihs_grantamount grantageqtr516 grantageqtr1732 grantageqtr33plus presparty2 clintonlewis unified second_term pres_sameparty_cut pres_diffparty_cut ///
agendum1 agendum2 agendum3 agendum4 agendum5 agendum6 agendum7 agendum8 agendum9 agendum10 agendum11 agendum12 agendum13 agendum14 ///
agendum15 agendum17 agendum18 agendum19 agendum20 agendum21 ///
yeardum6 yeardum7 yeardum8 yeardum9 yeardum10 yeardum11 yeardum12 yeardum13 yeardum14 yeardum15 yeardum16 yeardum17 ///
yeardum18 yeardum19 yeardum20 yeardum21 yeardum22 yeardum23 yeardum24 yeardum25  if neg_fed_funding>0 & type_of_grant !="03" & type_of_action=="C", fe i(program_id) q(75)


*** POLITICAL ACCOUNTABILITY-MOTIVATED GRANT RETRENCHMENT EFFECTS [INDIVIDUAL GRANT RETRENCHMENTS] ***

lincom  (presparty2xclintonlewis*0.677539*2)
*
lincom (zloyalty2_abszero*0.569556*2)



*** BUREAUCRATIC REPSONSIBILITY-MOTIVATED GRANT RETRENCHMENT EFFECTS [INDIVIDUAL GRANT RETRENCHMENTS] ***  

lincom  (zmanage2_abszero*0.6853556*2) 
*
lincom (zpolicy2_abszero*0.6009016*2)

*
*


*q = 90 *

xtrifreg neg_fed_funding presparty2xclintonlewis  zloyalty2_abszero  zmanage2_abszero zpolicy2_abszero  agency_totalgrantamtyr lnagencycomplexity  ///
cuts_year ihs_grantamount grantageqtr516 grantageqtr1732 grantageqtr33plus presparty2 clintonlewis unified second_term pres_sameparty_cut pres_diffparty_cut ///
agendum1 agendum2 agendum3 agendum4 agendum5 agendum6 agendum7 agendum8 agendum9 agendum10 agendum11 agendum12 agendum13 agendum14 ///
agendum15 agendum17 agendum18 agendum19 agendum20 agendum21 ///
yeardum6 yeardum7 yeardum8 yeardum9 yeardum10 yeardum11 yeardum12 yeardum13 yeardum14 yeardum15 yeardum16 yeardum17 ///
yeardum18 yeardum19 yeardum20 yeardum21 yeardum22 yeardum23 yeardum24 yeardum25  if neg_fed_funding>0 & type_of_grant !="03" & type_of_action=="C", fe i(program_id) q(90)


*** POLITICAL ACCOUNTABILITY-MOTIVATED GRANT RETRENCHMENT EFFECTS [INDIVIDUAL GRANT RETRENCHMENTS] ***

lincom  (presparty2xclintonlewis*0.677539*2)
*
lincom (zloyalty2_abszero*0.569556*2)


*** BUREAUCRATIC REPSONSIBILITY-MOTIVATED GRANT RETRENCHMENT EFFECTS [INDIVIDUAL GRANT RETRENCHMENTS] ***  

lincom  (zmanage2_abszero*0.6853556*2) 
*
lincom (zpolicy2_abszero*0.6009016*2)

*
*


*q = 99 *

xtrifreg neg_fed_funding presparty2xclintonlewis  zloyalty2_abszero  zmanage2_abszero zpolicy2_abszero  agency_totalgrantamtyr lnagencycomplexity  ///
cuts_year ihs_grantamount grantageqtr516 grantageqtr1732 grantageqtr33plus presparty2 clintonlewis unified second_term pres_sameparty_cut pres_diffparty_cut ///
agendum1 agendum2 agendum3 agendum4 agendum5 agendum6 agendum7 agendum8 agendum9 agendum10 agendum11 agendum12 agendum13 agendum14 ///
agendum15 agendum17 agendum18 agendum19 agendum20 agendum21 ///
yeardum6 yeardum7 yeardum8 yeardum9 yeardum10 yeardum11 yeardum12 yeardum13 yeardum14 yeardum15 yeardum16 yeardum17 ///
yeardum18 yeardum19 yeardum20 yeardum21 yeardum22 yeardum23 yeardum24 yeardum25  if neg_fed_funding>0 & type_of_grant !="03" & type_of_action=="C", fe i(program_id) q(99)


*** POLITICAL ACCOUNTABILITY-MOTIVATED GRANT RETRENCHMENT EFFECTS [INDIVIDUAL GRANT RETRENCHMENTS] ***

lincom  (presparty2xclintonlewis*0.677539*2)
*
lincom (zloyalty2_abszero*0.569556*2)


*** BUREAUCRATIC REPSONSIBILITY-MOTIVATED GRANT RETRENCHMENT EFFECTS [INDIVIDUAL GRANT RETRENCHMENTS] ***  

lincom  (zmanage2_abszero*0.6853556*2) 
*
lincom (zpolicy2_abszero*0.6009016*2)

*
*




********************************************************************************************************************************************************************************************************************************************************
********************************************************************************************************************************************************************************************************************************************************
********************************************************************************************************************************************************************************************************************************************************
********************************************************************************************************************************************************************************************************************************************************
********************************************************************************************************************************************************************************************************************************************************
********************************************************************************************************************************************************************************************************************************************************
********************************************************************************************************************************************************************************************************************************************************
********************************************************************************************************************************************************************************************************************************************************

save "C:\Users\gk57526\Dropbox\Executive Particularism (Matt Zarit)\Negative Grants\Winter 2020\Data\neg_grants_data.01-02-2020.03-18-2020.varsadded.dta", replace


log close


********************************************************************************************************************************************************************************************************************************************************
********************************************************************************************************************************************************************************************************************************************************
********************************************************************************************************************************************************************************************************************************************************
********************************************************************************************************************************************************************************************************************************************************
********************************************************************************************************************************************************************************************************************************************************
********************************************************************************************************************************************************************************************************************************************************
********************************************************************************************************************************************************************************************************************************************************
********************************************************************************************************************************************************************************************************************************************************
********************************************************************************************************************************************************************************************************************************************************
********************************************************************************************************************************************************************************************************************************************************
********************************************************************************************************************************************************************************************************************************************************
********************************************************************************************************************************************************************************************************************************************************
********************************************************************************************************************************************************************************************************************************************************
********************************************************************************************************************************************************************************************************************************************************
********************************************************************************************************************************************************************************************************************************************************
********************************************************************************************************************************************************************************************************************************************************



